package _mst;

/**
 * 面试题 05.01. 插入
 */
public class T0501 {
    public int insertBits(int N, int M, int i, int j) {
        M <<= i;
        for (; i <= j; i++) {
            N &= ~(1 << i);
        }
        return N | M;
    }
}